package com.daily.DailyStudy.Shallow2DeepCopy;

import lombok.Data;

/**
 * 浅拷贝
 *
 * */
@Data
public class Bookshelf implements Cloneable{

    private Integer num;

    private String name;

    private Book book;

    @Override
    protected Object clone(){
        try{
            return super.clone();
        }catch (CloneNotSupportedException e){
            return null;
        }
    }
}
